package org.friping.mytool.helper;

import org.androidannotations.annotations.EBean;

import java.io.IOException;
import java.io.InputStream;

@EBean
public class FileHelper {
    public String inputStream2String (InputStream in) throws IOException{
        StringBuffer out = new StringBuffer();
        byte[] b = new byte[4096];
        for (int n; (n = in.read(b)) != -1;)   {
            out.append(new String(b,0, n));
        }
        return out.toString();
    }
}
